package cn.chiship.framework.upms.biz.user.service;

import cn.chiship.framework.upms.biz.user.entity.UpmsUserPermission;
import cn.chiship.framework.upms.biz.user.entity.UpmsUserPermissionExample;
import cn.chiship.sdk.framework.base.BaseService;
import cn.chiship.sdk.core.base.BaseResult;

import java.util.List;

/**
 * 用户权限关联表业务接口层
 * 2021/9/27
 * @author lijian
 */
public interface UpmsUserPermissionService extends BaseService<UpmsUserPermission, UpmsUserPermissionExample> {

    /**
     * 保存
     * @param userId
     * @param permissionIdList
     * @return
     */
    BaseResult userPermissionSave(String userId, List<String> permissionIdList);

    /**
     * 获取指定用户下权限
     * @param userId
     * @return
     */
    BaseResult getPermissionByUserId(String userId);

    /**
     * 更新
     * @param userId
     * @param permissionIdList
     * @return
     */
    BaseResult userPermissionRemove(String userId,List<String> permissionIdList);
}
